﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<CommonLibrary.DataModel.Basic.UserEntity>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>唯购移动协同</title>

    <script src="../../Scripts/template/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>

    <script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>

    <script type="text/javascript">
        var isoktologin = false;
        $(function() {
            $("#ValidCode").bind("click", function() {
                $("#validate_code").val("");
                this.src = "/Login/GetValidateImage?time=" + (new Date()).getTime();
            });

            var naviType = navigator.appName;
            $("#navigator_type").val(naviType);
            //传说是判断360的
            //            if (window.external && window.external.twGetRunPath && window.external.twGetRunPath().toLowerCase().indexOf("360se") > -1) {
            //                isoktologin = true;
            //            }

            //ie  取消限制 2013-01-15 mlh
            //            var explorer = window.navigator.userAgent;
            //            isoktologin = (explorer.indexOf("MSIE") >= 0 || explorer.indexOf("Firefox") >= 0) ? true : false;
            //            if (!isoktologin) {
            //                alert("请使用ie或者360浏览器");
            //                $("#loginbtn").attr("disabled", "disabled");
            //                $("#llqts").html("请使用ie或者360浏览器!");
            //                return false;
            //            }

        })

        function getpassword(tag) {
            var login_id = $(tag).val();
            $.ajax({
                type: "POST",
                url: "/Login/GetPassword",
                data: { "login_id": login_id },
                success: function(data) {
                    if (data != "")
                        $("#user_psw").val(data);
                }
            })
        }
    </script>

    <style type="text/css">
        .button
        {
            font-family: Verdana, Arial, sans-serif;
            display: inline-block;
            background: #9C2400 url('../images/bg-button-red.png') top left repeat-x !important;
            border: 1px solid #9C2400 !important;
            padding: 2px 5px 2px 5px !important;
            color: white !important;
            font-size: 14px !important;
            -webkit-border-radius: 4px;
            border-radius: 4px;
        }
        .button:hover
        {
            cursor: pointer;
        }
        .button:active
        {
            padding: 5px 7px 3px 7px !important;
        }
    </style>
</head>
<body style="background: #fff url(images/weigouoalogin.gif) no-repeat; background-position: center center;
    width: 100%; height: 100%;">
    <center>
        <div style="background: url(images/login_box.png) top left no-repeat; width: 480px;
            height: 450px; margin-left: 100px; margin-top: 150px;">
            <div style="width: 250px; height: 180px; margin-left: 190px; padding-top: 100px;">
                <div>
                    <form action="/" method="post" style="margin-top: 10px;">
                    <div style="width: 250px; height: 27px; margin-top: 15px;">
                        <input id="user_loginid" name="user_loginid" style="float: left; border: 1px solid #898989;
                            margin-left: 90px; margin-top: 5px; width: 130px;" type="text" value="" onblur="getpassword(this)" />
                    </div>
                    <div style="width: 250px; height: 27px;">
                        <input id="user_psw" name="user_psw" style="float: left; border: 1px solid #898989;
                            margin-left: 90px; margin-top: 6px; width: 130px;" type="password" />
                    </div>
                    <div style="width: 250px; height: 27px;">
                        <input type="hidden" id="navigator_type" />
                        <input id="validate_input" name="validate_input" style="float: left; border: 1px solid #898989;
                            margin-left: 90px; margin-top: 6px; width: 55px; height: 16px;" type="text" value="" />
                        <img id="ValidCode" style="float: left; cursor: pointer; border: 1px solid #898989;
                            margin-left: 12px; margin-top: 6px; width: 60px; height: 16px;" src="/Login/GetValidateImage" />
                    </div>
                    <div style="width: 250px; height: 20px;">
                        <%--<input id="chk_remember" style="margin-left: 67px; margin-top: 7px; width: 10px;"
                        type="checkbox" />--%>
                        <%=Html.CheckBox("chk_remember",false,new{@style="margin-left: 67px; margin-top: 7px; width: 10px;"}) %>
                    </div>
                    <div style="width: 250px; height: 45px; margin-top: 5px;">
                        <input id="loginbtn" class="button" style="margin-left: 20px; margin-top: 6px; width: 130px;
                            height: 32px;" type="submit" value="登 录" />
                    </div>
                    <div class="clear">
                    </div>
                    <br />
                    <h3 style="position: absolute; left: 100; margin-top: -10px; color: #000">
                        <%=Html.ValidationMessageFor(m => m.user_loginid)%>
                        <%=Html.ValidationMessageFor(m => m.user_psw)%>
                        <%=ViewData["loginresult"]%>
                        <span id="llqts"></span>
                    </h3>
                    </form>
                </div>
            </div>
        </div>
    </center>
</body>
<%--<body class="login_bg">
    <div class="login_all">
        <center>
            <div class="login_box">
                <div id="Div1">
                    <div id="Div2">
                        <%using (Html.BeginForm())
                          { %>
                        <br />
                        <p>
                            <%=Html.Label("用 户:")%>
                            <%=Html.TextBoxFor(m => m.user_loginid, new { @class = "text-input", @style = "border:1px solid #898989; margin-top:-4px;" })%>
                        </p>
                        <div class="clear">
                        </div>
                        <p>
                            <%=Html.Label("密 码:")%>
                            <%=Html.PasswordFor(m => m.user_psw, new { @class = "text-input", @style = "border:1px solid #898989; margin-top:-4px;" })%>
                        </p>
                        <div class="clear">
                        </div>
                        <p>
                            <input type="hidden" id="Hidden1" />
                            <img id="Img1" style="cursor: pointer; float: left;" src="/Login/GetValidateImage"
                                alt="验证码" />
                            <%=Html.TextBox("validate_input", "", new { @style = "width:100px; height:24px; margin-left:20px; margin-bottom:15px; font-size:18px; border:1px solid #898989;-moz-border-radius: 4px; -webkit-border-radius: 4px;border-radius: 4px;" })%>
                            <input id="loginbtn" class="button" style="width: 70px; margin-left: 30px;" type="submit"
                                value="登 录" />
                        </p>
                        <div class="clear">    
                        </div>
                        <h3 style="position: absolute; left: 100; margin-top: -10px; color: #000">
                            <%=Html.ValidationMessageFor(m => m.user_loginid)%>
                            <%=Html.ValidationMessageFor(m => m.user_psw)%>
                            <%=ViewData["loginresult"]%>
                            <span id="Span1"></span>
                        </h3>
                        <%
                            } %>
                    </div>
                </div>
            </div>
        </center>
    </div>
</body>--%>
</html>
